package com.sky.mapper;

import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Select;
import org.apache.ibatis.annotations.Update;

@Mapper
public interface UpdatePasswordMapper {
    // 获取用户密码
    @Select("SELECT password FROM user WHERE id = #{id}")
    String getPasswordById(Long id);

    // 更新用户密码
    @Update("UPDATE user SET password = #{newPassword} WHERE id = #{id}")
    void updatePassword(Long id, String newPassword);
}
